home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbnws102.zip
/
GRAPHSPK.ZIP
/
SCR2BITS.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-12-28
|
2KB
|
49 lines
'======================= SCR2BITS.BAS ==================================
' Quick Basic 4.5
' Copyright 1989 - Frederick Volking
' All Rights released to public domain by original author on 12/01/89
'
' =====================================================================
'
' This program displays the bit-map for a 16x16 pixel image stored
' with the graphics GET image command for Screen 2 - CGA monochrome.
'
' This program requires the function BITON.BAS be merged with it.
'
' ==================================================================
' Author: Frederick Volking
' Contact: (415)952-3450 [home] (415)378-4640 [work]
' USPO Mail: 425 Larch Avenue - South San Francisco, CA 94080
' EchoMail: ANY Basic conference (I try to read them all)
' Library At: QBCentral BBS - Vancouver Washington (206)892-7500
' ==================================================================
DEFINT A-Z
CLS
SCREEN 2
IntsNeeded = 18
DIM A(1 TO IntsNeeded)
CLS
LINE (0, 0)-(15, 15), 1, B
LINE (0, 0)-(15, 15), 1
GET (0, 0)-(15, 15), A
LOCATE 1, 10: PRINT "Integers Used = "; IntsNeeded
LOCATE 2, 10: PRINT "Array Element 1 = "; A(1)
LOCATE 3, 10: PRINT "Array Element 2 = "; A(2)
LOCATE 4, 10: PRINT "Color = "; Clr
PRINT
FOR C = 3 TO IntsNeeded
FOR Bit = 1 TO 8
IF (BitOn(Bit, A(C))) THEN PRINT "1"; ELSE PRINT "0";
NEXT
PRINT " ";
FOR Bit = 9 TO 16
IF (BitOn(Bit, A(C))) THEN PRINT "1"; ELSE PRINT "0";
NEXT
PRINT " ";
NEXT
WHILE INKEY$ = "" : WEND
SCREEN 0
CLS
END